<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .perspective{
            transform-style: preserve-3d;
            perspective: 1000px;
        }
        .box{
            width: 300px;
            height: 300px;
            margin: 100px auto;
            font-size: 30px;
            position: relative;
            transform: rotateY(290deg);
            /* transform: rotateX(15deg) rotateY(15deg) rotateZ(15deg); */
        }
        .child{
            width: 300px;
            height: 300px;
            position: absolute;
            top: 0;
            left: 0;
            opacity: .5;
        }
        .child:nth-child(1) {
            background-color: red;
            transform: translateY(150px) rotateX(90deg);
        }
        .child:nth-child(2) {
            background-color: yellow;
            transform: translateY(-150px) rotateX(90deg);
        }
        .child:nth-child(3) {
            background-color: yellowgreen;
            transform: translateZ(-150px);
        }
        .child:nth-child(4) {
            background-color: blueviolet;
            transform: translateZ(150px);
        }
        .child:nth-child(5) {
            background-color: violet;
            transform: translateX(-150px) rotateY(90deg);
        }
        .child:nth-child(6) {
            background-color: rgba(0, 0, 0, .5);
            transform: translateX(150px) rotateY(90deg);
        }
    </style>
</head>
<body class="perspective">
    <div class="box perspective">
        <div class="child">1</div>
        <div class="child">2</div>
        <div class="child">3</div>
        <div class="child">4</div>
        <div class="child">5</div>
        <div class="child">6</div>
    </div>
</body>
</html>